package com.zmn.oms.services.interfaces.conf.distribute;

import com.zmn.oms.model.entity.conf.distribute.CheckCityAvailableQuery;
import com.zmn.oms.model.entity.conf.distribute.NonGridRobOrderConfig;
import com.zmn.oms.model.entity.conf.distribute.NonGridRobOrderConfigQuery;

import java.util.List;

/**
 * 接口描述  无网格抢单业务配置接口
 *
 * @author fubiao
 * @since 2022/07/18
 */
public interface NonGridRobOrderConfigService {

    /**
     *  根据主键查询
     * @param nonGridConfigId
     * @return
     */
    NonGridRobOrderConfig findByKey(Integer nonGridConfigId);

    /**
     * 根据平台&业务类型&派单方式查询
     * @param platIds
     * @param bizType
     * @param distributeWay
     * @return
     */
    List<NonGridRobOrderConfig> listByPlatIdAndBizType(List<Integer> platIds, Integer bizType, Integer distributeWay);

    /**
     *  根据query查询无网格抢单配置
     * @param configQuery
     * @return
     */
    List<NonGridRobOrderConfig> listNoGridRobConfigByQuery(NonGridRobOrderConfigQuery configQuery);

    /**
     * 查询已经被设置过的
     * @param query
     * @return
     */
    List<Integer> hasBeenSetCity(CheckCityAvailableQuery query);

    /**
     *  查询数量
     * @param configQuery
     * @return
     */
    Integer countByQuery(NonGridRobOrderConfigQuery configQuery);

    /**
     *  新增配置
     * @param nonGridRobOrderConfig
     * @return
     */
    Integer insert(NonGridRobOrderConfig nonGridRobOrderConfig);

    /**
     *  修改配置
     * @param nonGridRobOrderConfig
     * @return
     */
    Integer update(NonGridRobOrderConfig nonGridRobOrderConfig);
}
